﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "login.asp"
	Response.end
end if
IF  Request.QueryString("Action")="login" Then
	call login
else
	call index
end if
end Function



Function index
	dim act,id
    		act = Request("act")    
    		If act = "" Then act = 1
    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
    		If id < 1 Then id = 1

%>
	<card title="更改订单状态"><p align="left">
        ==选择更改的状态==<br/>
    	<a href="shopdn.asp?Action=login&amp;Act=1&amp;id=<%=id%>&amp;sid=<%=sid%>">待审</a>.<a href="shopdn.asp?Action=login&amp;Act=2&amp;id=<%=id%>&amp;sid=<%=sid%>">联系</a>.<a href="shopdn.asp?Action=login&amp;Act=3&amp;id=<%=id%>&amp;sid=<%=sid%>">发货</a>.<a href="shopdn.asp?Action=login&amp;Act=4&amp;id=<%=id%>&amp;sid=<%=sid%>">成功</a><br/>
-------------<br/>
<a href='shopd.asp?act=<%=act%>&amp;sid=<%=sid%>'>返回商品订单管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
End Function


Function login

		dim rs,sql,id,act,nan
    		act = Request("act")    
    		If act = "" Then act = 1
    		id = Request("id")    
    		If id = "" Then id = 1
   		If Not IsNumeric(id) Then id = 1
    		id = CLng(id)
    		If id < 1 Then id = 1
select case act
case "1"
nan="未审核"
case "2"
nan="已联系"
case "3"
nan="已发货"
case "4"
nan="已成功"
End Select

	%>
	<card id="login" title="更改订单状态" ontimer="shopd.asp?sid=<%=sid%>"><timer value="20"/>
		<p align="left">
	<%

		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select top 1 todd  FROM qingtian_shopd where id="&id&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
                rs("todd")=nan
		rs.update()
		end if
		rs.Close
		Set rs = Nothing
		%>更改订单状态成功!<br/>
<a href='shopd.asp?act=<%=act%>&amp;sid=<%=sid%>'>返回商品订单管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function 

%>
